Implement <nodoc> build profile
authorSimon McVittie <smcv@debian.org>
Wed, 21 Jun 2017 09:37:16 +0000 (10:37 +0100)
committerSimon McVittie <smcv@debian.org>
Wed, 21 Jun 2017 10:11:13 +0000 (11:11 +0100)
debian/changelog
debian/control
debian/ostree.install [changed mode: 0644->0755]
debian/rules

index 5a47ecd7740a1020647e90d517f96de9d52ff31a..4850e53026cbae818192be6d1e1202a05cd69a10 100644 (file)
@@ -5,6 +5,7 @@ ostree (2017.7-1) UNRELEASED; urgency=medium
     - Use https URL for copyright-format
   * debian/dist/: Add ostree-trivial-httpd.xml, which was incorrectly
     excluded from the upstream release
+  * Implement <nodoc> build profile
 
  -- Simon McVittie <smcv@debian.org>  Wed, 21 Jun 2017 10:07:42 +0100
 
index 8be2126d0d088fc7f5341550d1957757f10a26dc..24ab5a9042717769dcea568c577e4842433eb0a0 100644 (file)
@@ -14,14 +14,15 @@ Build-Depends:
  ca-certificates,
  cpio,
  debhelper (>= 10~),
- docbook-xml,
- docbook-xsl,
+ dh-exec,
+ docbook-xml <!nodoc>,
+ docbook-xsl <!nodoc>,
  e2fslibs-dev,
  elfutils,
  fuse,
  gjs [!sparc64],
  gobject-introspection,
- gtk-doc-tools,
+ gtk-doc-tools <!nodoc>,
  libarchive-dev,
  libattr1-dev,
  libcap-dev,
@@ -38,7 +39,7 @@ Build-Depends:
  procps,
  python <!nocheck>,
  python-yaml <!nocheck>,
- xsltproc,
+ xsltproc <!nodoc>,
  zlib1g-dev,
 Standards-Version: 4.0.0
 Homepage: https://github.com/ostreedev/ostree/
@@ -105,6 +106,7 @@ Description: Development files for the ostree library
  This package contains development headers and the pkg-config file for ostree.
 
 Package: libostree-doc
+Build-Profiles: <!nodoc>
 Architecture: all
 Multi-Arch: foreign
 Section: doc
old mode 100644 (file)
new mode 100755 (executable)
index 4e555f9..b4b1a18
@@ -1,5 +1,7 @@
+#!/usr/bin/dh-exec
+
 etc/ostree
 usr/bin/ostree
 usr/bin/rofiles-fuse
-usr/share/man
+usr/share/man <!nodoc>
 usr/share/ostree/trusted.gpg.d
index c8e38178de41cc58773f4734f084d7098c972e8f..269f66d820160ccd2c0b7f71eb88601ae6061a1c 100755 (executable)
@@ -16,19 +16,27 @@ override_dh_autoreconf:
        env NOCONFIGURE=1 dh_autoreconf ./autogen.sh
        cp debian/dist/ostree-trivial-httpd.xml man/
 
+configure_options = \
+       --enable-installed-tests \
+       --enable-trivial-httpd-cmdline \
+       --libexecdir='$${prefix}/lib' \
+       --with-dracut \
+       --with-grub2 \
+       --with-grub2-mkconfig-path=/usr/sbin/grub-mkconfig \
+       --with-systemdsystemgeneratordir=/lib/systemd/system-generators \
+       --with-systemdsystemunitdir=/lib/systemd/system \
+       $(NULL)
+
+ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
+configure_options += --enable-gtk-doc
+configure_options += --enable-man
+else
+configure_options += --disable-gtk-doc
+configure_options += --disable-man
+endif
+
 override_dh_auto_configure:
-       dh_auto_configure -- \
-               --disable-silent-rules \
-               --enable-gtk-doc \
-               --enable-installed-tests \
-               --enable-trivial-httpd-cmdline \
-               --libexecdir='$${prefix}/lib' \
-               --with-dracut \
-               --with-grub2 \
-               --with-grub2-mkconfig-path=/usr/sbin/grub-mkconfig \
-               --with-systemdsystemgeneratordir=/lib/systemd/system-generators \
-               --with-systemdsystemunitdir=/lib/systemd/system \
-               $(NULL)
+       dh_auto_configure -- $(configure_options)
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
@@ -37,12 +45,14 @@ endif
 
 override_dh_auto_install:
        dh_auto_install
+ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
        # docbook-xsl capitalizes the whole heading, including the macro
        # used to represent a single quote... https://bugs.debian.org/821235
        sed -i -e 's,\*(AQ,*(Aq,g' \
                debian/tmp/usr/share/man/man1/ostree-remote.1 \
                debian/tmp/usr/share/man/man1/ostree-static-delta.1 \
                $(NULL)
+endif
 
 override_dh_install:
        rm -f debian/tmp/usr/lib/*/*.la